function GetQueryString(name){
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}
$(function () {
		// body...	
     //do something
     	var id=GetQueryString("id");
     	
	if(id !=null && id.toString().length>0)
	{	
		var reMethod = "GET";
		$.ajax({
			type: reMethod,
			url: "getMessageById.action",
			data: "id="+id,
			dataType: 'json',
			success: function(msg) {
				result = msg.data;
				$('#title').html(result.titile);
				$('#visitorName').html("BY "+result.visitorName);
				$('#email').html(result.email);
				$('#msgContext').html(result.msgContext);
				
			}
		});
	 }
	
});